package com.share.shareplatform.sharegoods.service.impl;


import com.share.shareplatform.pojo.Brand;
import com.share.shareplatform.sharegoods.dao.BrandDao;
import com.share.shareplatform.sharegoods.service.BrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BrandServiceImpl implements BrandService {

    @Autowired
    private BrandDao brandDao;

    @Override
    public Long addOne(Brand brand) {
        return brandDao.addOne(brand);
    }

    @Override
    public Integer updateOne(Brand brand) {
        return brandDao.updateOne(brand);
    }

    @Override
    public Integer deleteOneById(Long id) {
        return brandDao.deleteOneById(id);
    }

    @Override
    public Integer deleteAllByIds(Long[] ids) {
        return brandDao.deleteAllByIds(ids);
    }

    @Override
    public Brand findOneByName(String name) {
        return brandDao.findOneByName(name);
    }

    @Override
    public Brand findOneById(Long id) {
        return brandDao.findOneById(id);
    }

    @Override
    public List<Brand> findAll() {
        return brandDao.findAll();
    }
}
